﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;

/// <summary>
/// Summary description for Ketnoi
/// </summary>
public class Ketnoi
{
    public static string connectionstring = System.Configuration.ConfigurationManager.ConnectionStrings["VietComBankConnectionString"].ConnectionString.ToString();
    public static SqlConnection connection;
	public Ketnoi()
	{
        if (connection == null)
        {
            connection = new SqlConnection(connectionstring);
        }
	}
    public SqlConnection GetConnection()
    {
        if (connection.State == System.Data.ConnectionState.Closed)
        {
            connection.Open();
            return connection;
        }
        else
        {
            return connection;
        }
    }
}